//
//  OldPhotoVipController.m
//  OldPhoto
//
//  Created by 蓝鳍互娱 on 2024/7/29.
//

#import "OldPhotoVipController.h"

@interface OldPhotoVipController ()
@property (nonatomic,strong) UILabel *oldPhotoVipPriceLab;
@end

@implementation OldPhotoVipController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}
- (void)creatOldPhotoInitView{
    [super creatOldPhotoInitView];
    self.oldPhotoBgImg = @"OldPhotoVipBg";
    
    UILabel *oldPhotoVipHeadLab = [[UILabel alloc] init];
    oldPhotoVipHeadLab.textColor = OldPhotoHex(@"#3D375E");
    oldPhotoVipHeadLab.font = [UIFont systemFontOfSize:OldPhotoRatio(50) weight:UIFontWeightRegular];
    oldPhotoVipHeadLab.text = @"老照片修复";
    [self.view addSubview:oldPhotoVipHeadLab];
    [oldPhotoVipHeadLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(@(OldPhotoRatio(647) + OldPhotoTopSafeHeight));
        make.centerX.equalTo(self.view);
        make.height.equalTo(@(OldPhotoRatio(60)));
    }];
    
    self.oldPhotoVipPriceLab = [[UILabel alloc] init];
    self.oldPhotoVipPriceLab.numberOfLines = 0;
    self.oldPhotoVipPriceLab.textAlignment = NSTextAlignmentCenter;
    [self.view addSubview:self.oldPhotoVipPriceLab];
    [self.oldPhotoVipPriceLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@(OldPhotoRatio(66)));
        make.right.equalTo(@(-OldPhotoRatio(66)));
        make.height.equalTo(@(OldPhotoRatio(100)));
        make.top.equalTo(oldPhotoVipHeadLab.mas_top).offset(OldPhotoRatio(14));
    }];
    NSString * oldPhotoVipPrice = [NSString stringWithFormat:@"免费试用3天，可自动续订，续费￥0/年，免费享受后续功能迭代，无需额外付费，随时取消"];
    NSString *oldPhotoVipChange = [NSString stringWithFormat:@"续费￥0/年"];
    NSRange oldPhotoPriceRange = [oldPhotoVipPrice rangeOfString:oldPhotoVipChange];
    NSMutableAttributedString *oldPhotoVipMutPrice = [[NSMutableAttributedString alloc] initWithString:oldPhotoVipPrice];
    [oldPhotoVipMutPrice addAttribute:NSForegroundColorAttributeName value:OldPhotoHex(@"#3D375E") range:NSMakeRange(0,oldPhotoVipMutPrice.length)];
    [oldPhotoVipMutPrice addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:OldPhotoRatio(28) weight:UIFontWeightRegular] range:NSMakeRange(0,oldPhotoVipMutPrice.length)];
    [oldPhotoVipMutPrice addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:OldPhotoRatio(32) weight:UIFontWeightBold] range:oldPhotoPriceRange];
    self.oldPhotoVipPriceLab.attributedText = oldPhotoVipMutPrice;
    
    
}
@end
